﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Cooperation.Layout;

namespace Cooperation
{
    public partial class Home : Form
    {
        private static Home HomeForm = null;
        private Home()
        {
            InitializeComponent();
            HomeForm = this;
            this.SetBounds((Screen.GetBounds(this).Width / 2) - (this.Width / 2),
              (Screen.GetBounds(this).Height / 2) - (this.Height / 2),
              this.Width, this.Height, BoundsSpecified.Location);
            Window.AnimateWindow(Handle, 500, Window.AW_BLEND);
            
        }
        public static void ShowHomeForm()
        {
            if (HomeForm == null)
            {
                new Home();
                HomeForm.Show();
            }
            else
            {
                HomeForm.Show();
            }
        }
        private void Home_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (HomeForm != null)
            {
                HomeForm = null;
            }
            Index.IndexForm.Visible = true;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}
